<template>
    <div>
        <!-- 面包屑导航 -->
        <el-breadcrumb separator="/">
            <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
            <el-breadcrumb-item>数据统计</el-breadcrumb-item>
            <el-breadcrumb-item>数据报表</el-breadcrumb-item>
        </el-breadcrumb>

        <!-- 卡片视图区域 -->
        <el-card>
            <!-- echarts -->
            <div id="main" style="width:750px;height:400px;"></div>
        </el-card>
    </div>
</template>

<script>
// 引入echart
import * as echarts from 'echarts';

export default {
    data() {
        return {

        }
    },
    // 在页面dom元素渲染完成时触发
    mounted() {
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('main'));

        // 绘制图表
        myChart.setOption({
            title: {
                text: 'ECharts 入门示例'
            },
            tooltip: {},
            xAxis: {
                data: ['管理员', '主管', '销售', '运营', '普通用户', '作者']
            },
            yAxis: {},
            series: [
                {
                    name: '人数',
                    type: 'bar',
                    data: [5, 20, 36, 10, 10, 1]
                }
            ]
        });
    },
    methods: {
    }
}
</script>

<style lang="less" scoped>
#main {
    margin: 0 auto;
}
</style>
